package com.kele.feign;

import com.kele.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Collection;

/**
 *
 * @author kele
 * @date 2021/8/9 15:07
 * @description : feign 声明式接口
 * `@FeignClient` 的 fallback 属性设置映射。熔断机制
 */
@FeignClient(value = "provider")
public interface FeignProviderClient {

    @GetMapping("/findAll")
    public Collection<User> findAll();

    @GetMapping("/index")
    public String index();

}
